package net.hn.hnms.biz.activiti.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Author: PanSX
 * Date: 2023/8/31 14:55
 */
@Entity
@Table(name = "cssit_task")
@Data
public class MyTask {
    @Id
    private String id;

    private String name;

    private String assignee;

    private String assigneeNo;
    @ApiModelProperty("完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date completionDate;
    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date startDate;

    @OneToMany(fetch = FetchType.LAZY,cascade = CascadeType.ALL)
    @ApiModelProperty(value = "表单信息")
    @JoinColumn(name = "task_id", referencedColumnName = "id")
    private List<MyForm> forms=new ArrayList<>();
}
